package com.example.myapplication;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;

public class DetailActivity extends AppCompatActivity {

    private ImageView headImgs;
    private TextView username;
    private TextView jiage;
    private TextView score;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
            setContentView(R.layout.detail_activity_layout);
            initView();
            initData();
            initEvent();
    }
    public void initView(){
        headImgs = findViewById(R.id.foot);
        username = findViewById(R.id.name);
        score = findViewById(R.id.content_tv);
        jiage = findViewById(R.id.name2);

    }
    public void initData(){
        Intent intent = getIntent();
        String nameStr = intent.getStringExtra("name");
        String contentStr = intent.getStringExtra("content");
        String name2Str = intent.getStringExtra("name2");
        int footStr = intent.getIntExtra("foot",0);
        headImgs.setImageResource(footStr);
        username.setText(nameStr);
        score.setText(contentStr);
        jiage.setText(name2Str);

    }
    public void initEvent(){

    }
}
